package demo11;

public class Tool {
    static double LatestTaxStandard(double income) {
        double Tax = 0;
        try {
            if (0 <= income && income <= 3000) {
                Tax = 0;
            }
            if (3000 <= income && income <= 5000) {
                Tax = (income - 3000) * 0.10;
            }
            if (5000 < income && income <= 12000) {
                Tax = (income - 5000) * 0.10;
            }
            if (12000 < income && income <= 25000) {
                Tax = (income - 12000) * 0.20;
            }
            if (25000 < income && income <= 35000) {
                Tax = (income - 25000) * 0.25;
            }
            if (35000 < income && income <= 55000) {
                Tax = (income - 35000) * 0.30;
            }
            if (income < 0) {
                System.out.println("18周劳务费用有误，检查后输入！");
            }
        } catch (Exception e) {
            System.out.println("18周劳务费用金额有误！检查后输入");
        }
        final double Tax0 = Tax;
        return Tax0;
    }
}
